var SIZE = 30;
var SIZE_VAR = 0;//大小浮动
var ROTATE_VAR = 90;//旋转浮动
class LrcLabel extends egret.TextField
{
    public constructor(text: string)
    {
        super();
        this.text = text;
        this.size = Math.random() * SIZE_VAR + SIZE;
        this.randColor(null);
        this.anchorX = this.anchorY = 0.5;
        var rotate = Math.random() * (ROTATE_VAR * 2) - ROTATE_VAR;
        //egret.Tween.get(this).to({ rotation: rotate }, 2000, egret.Ease.backOut);
        var timer = new egret.Timer(1000);
        timer.addEventListener(egret.TimerEvent.TIMER,this.randColor,this);
        //timer.start();
    }
    public randColor(e: egret.Event): void
    {
        //var randColor = Math.floor(Math.random() * COLORS.length);
        var randColor = Math.floor(Math.random() * 0xffffff);
        this.textColor = randColor;
    }
    public printInfo(): void
    {
        console.log("x:" + this.x + "y:" + this.y + "text:" + this.text);
    }
}